<?php
require_once '../model/connectionBD.php';
 
$resultats=$connexion->query("SELECT prenom FROM utilisateur"); 
	$resultats->setFetchMode(PDO::FETCH_OBJ); 
	
	while( $ligne = $resultats->fetch() ) 
	{
	        echo 'Utilisateur : '.$ligne->prenom.'<br />'; 
	}
	$resultats->closeCursor();


/*<?php
$con = mysql_connect("localhost","peter","abc123");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("my_db", $con);

mysql_query("UPDATE Persons SET Age = '36'
WHERE FirstName = 'Peter' AND LastName = 'Griffin'");

mysql_close($con);
?> 
*/

?>
